<?php
namespace app\common\validate;
use think\Validate;
class Card extends Validate
{
	protected $rule = [
        'card_no1' =>  'require|unique:card',
        'type'=>'require|in:1,2',
        'owner_type'=>'require|in:1,2',
    ];
	protected $message=[
		'card_no1.require'=>'卡号必须填写(且为10位)',
		'card_no1.unique'=>'卡号已经存在',
		'type.require'=>'卡的类型必须填写',
		'type.in'=>'卡类型必须是1，2',
		'owner_type'=>'持卡人类型必须是1，2',
	];
	protected $scene=[
		'inset'=>['card_no1','type','owner_type'],
		'create'=>['card_no1','type','owner_type'],
	];
}
